from db_model import EquipmentDB
db = EquipmentDB()# 查询记录
equipment = db.get_equipment(1)
print(equipment)

NewShuXingZuiDa = 33.9
NewShuXingZuiXiao = 36.1
NewZuiDaWaiGong = 63.8
NewHuiYi = 3.6
NewHuiXin = 7.3
NewShuXing = {
    'ShuXingZuiDa': NewShuXingZuiDa,
    'ShuXingZuiXiao': NewShuXingZuiXiao,
    'ZuiDaWaiGong': NewZuiDaWaiGong,
    'HuiYi': NewHuiYi,
    'HuiXin': NewHuiXin,
}

OldShi = 30.5 + 36.6
OldJin = 39.8
OldShuXingZuiDa = 34.3
OldHuiXin = 7.4
OldShuXing = {
    'Shi': OldShi,
    'Jin': OldJin,
    'ShuXingZuiDa': OldShuXingZuiDa,
    'HuiXin': OldHuiXin,
    'Shi': OldShi,
}

print(db.calculate_stats(OldShuXing, NewShuXing, equipment))

# 使用完毕后关闭连接
db.close()